import time
import unittest
from parameterized import parameterized
from htmltestreport import HTMLTestReport
import app
from script.TestLogin import TestLogin
from script.tender_test import TestTender

# 1.创建测试套件
suite = unittest.TestSuite()
# 2.用套件管理测试用例
suite.addTest(unittest.makeSuite(TestLogin))
suite.addTest(unittest.makeSuite(TestTender))

# 3.执行套件生成测试报告
log_path = app.BASE_URL + "/report/p2p{}.html".format(time.strftime("%Y%m%d_%H%M%S"))
runner = HTMLTestReport(log_path,title="p2p项目的接口测试报告")
runner.run(suite)

